//
//  BaseModel.m
//  RMNote
//
//  Created by 晓风残月 on 16/4/15.
//  Copyright © 2016年 lxf. All rights reserved.
//

#import "RMBaseModel.h"

@implementation RMBaseModel

- (void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.weather forKey:@"weather"];
    [aCoder encodeObject:self.content forKey:@"content"];
    [aCoder encodeObject:self.image forKey:@"image"];
    [aCoder encodeObject:self.createDate forKey:@"createDate"];
    [aCoder encodeObject:self.location forKey:@"location"];
    [aCoder encodeObject:self.type forKey:@"type"];
    [aCoder encodeObject:self.noteContent forKey:@"noteContent"];
    [aCoder encodeObject:self.picArr forKey:@"picArr"];
    [aCoder encodeBool:self.isLove forKey:@"isLove"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super init]) {
        self.isLove = [aDecoder decodeBoolForKey:@"isLove"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.weather = [aDecoder decodeObjectForKey:@"weather"];
        self.content = [aDecoder decodeObjectForKey:@"content"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
        self.createDate = [aDecoder decodeObjectForKey:@"createDate"];
        self.location = [aDecoder decodeObjectForKey:@"location"];
        self.noteContent = [aDecoder decodeObjectForKey:@"noteContent"];
        self.picArr = [aDecoder decodeObjectForKey:@"picArr"];

    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

@end
